function gettime() {
    $.ajax({
        url: "/time",
        timeout: 10000,
        success: function (data) {
            $("#time").html(data)
        },
        error: function (xhr, type, errorThrown) {

        }
    })
}

function get_zong_data() {
    $.ajax({
        url: "/zong",
        success: function (data) {
            $(".num h1").eq(0).text(data.TotalPrice)
            $(".num h1").eq(1).text(data.OrderNum)
            $(".num h1").eq(2).text(data.CustomNum)
        },
        error: function (xhr, type, errorThrown) {
        }
    })
}

function getspeed() {
    $.ajax({
        url: "/speed",
        timeout: 10000,
        success: function (data) {
            $("#speed").html(data)
        },
        error: function (xhr, type, errorThrown) {

        }
    })
}

function getditudata() {
    $.ajax({
        url: "/ditu",
        success: function (data) {
            // ec_center_optionMap.series[0].data = data.data
            // ec_center.setOption(ec_center_optionMap)
            option.series[0].data = data.CMap
            ec_center.setOption(option)
        },
        error: function (xhr, type, errorThrown) {

        }

    })
}

function getbooktop() {
    $.ajax({
        url: "/booktop",
        timeout: 10000,
        timeout: 10000,
        success: function (data) {
            option_ec_right2.xAxis.data = data.na
            option_ec_right2.series[0].data = data.value
            ec_right2.setOption(option_ec_right2)
        },
        error: function (xhr, type, errorThrown) {

        }
    });
}

function getpresstop() {
    $.ajax({
        url: "/presstop",
        timeout: 10000,
        timeout: 10000,
        success: function (data) {
            option_ec_left2.xAxis.data = data.na
            option_ec_left2.series[0].data = data.value
            ec_left2.setOption(option_ec_left2)
        },
        error: function (xhr, type, errorThrown) {

        }
    });
}

function getpayway() {
    $.ajax({
        url: "/payway",
        timeout: 10000,
        timeout: 10000,
        success: function (data) {
            bingtu_option.series[0].data = data.PayWay
            bingtu.setOption(bingtu_option)
        },
        error: function (xhr, type, errorThrown) {

        }
    });
}

function getprice() {
    $.ajax({
        url: "/price",
        timeout: 10000,
        timeout: 10000,
        success: function (data) {
            speed2_option.xAxis.data = data.time
            speed2_option.series[0].data = data.price
            speed2.setOption(speed2_option)
        },
        error: function (xhr, type, errorThrown) {

        }
    });
}

function getyunfei() {
    $.ajax({
        url: "/yunfei",
        timeout: 10000,
        timeout: 10000,
        success: function (data) {
            yunfei_option.angleAxis.data = data.site
            yunfei_option.series.data = data.value
            yunfei.setOption(yunfei_option)
        },
        error: function (xhr, type, errorThrown) {

        }
    });
}

setInterval(gettime, 1000)
setInterval(get_zong_data, 1000)
setInterval(getspeed, 1000)
setInterval(getditudata, 1000)
setInterval(getbooktop, 1000)
setInterval(getpresstop, 1000)
setInterval(getpayway, 1000)
// setInterval(getprice, 1000)
setInterval(getyunfei, 1000)
